import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm'

@Entity({name: "video"})
export class VideoEntity {
  @PrimaryGeneratedColumn()
  id: number

  @Column('int', {nullable: true})
  uid: number

  @Column('varchar', {length: 255, nullable: true})
  name: string

  @Column('varchar', {nullable: true})
  cover: string

  @Column('varchar', {nullable: true})
  video: string

  @Column('int', {default: 1, comment: "1：upload 2: b站"})
  type: string

  @Column('varchar', {nullable: true})
  bili_bvid: string

  @Column('text', {nullable: true})
  cut_config: string

  @Column('int', {default: 0, comment: `0: "未设置", 1: "已设置"`})
  status: number

  @CreateDateColumn({type: 'datetime'})
  createAt: Date

  @UpdateDateColumn({type: 'datetime'})
  updateAt: Date
}